< previous page page_250 next page >

Page 250
Each ODBC setup may be different, depending on the data source youre connecting to and the different driver versions. However, youll always need to specify a data source name. This name is what youll use to identify the information you just entered in the ODBC Administrator. By putting the information into the ODBC Administrator, you save yourself having to type in all this information in your application program. In addition, you can change the underlying data source but keep the same DSN, and your application should run against this new data source with little or no changes.
Adding a New Microsoft Access Data Source
Lets now create a Microsoft Access database data source. Youll find that the process is very similar but the ODBC driver for Access will ask for different information specific to opening an Access database.
EXERCISE
Create an Access DSN
1. Bring up the ODBC Data Sources Administrator dialog box from the Control Panel.
2. Click the Add button.
3. Select Microsoft Access Driver (*.mdb) from the list of drivers in the dialog box shown in Figure 12.6.
4. Click the Finish button to create the new data source.
analysis.gifOnce you click the Finish button, the ODBC Administrator calls a specific function in the appropriate driver to have it configure the data source. Each driver will bring up its appropriate dialog boxes. For the Microsoft Access driver, youll see the dialog shown in Figure 12.7.
8160-0250a.gif
Figure 12.7
The ODBC Microsoft Access 97 Setup dialog box.

 
< previous page page_250 next page >

If you like this book, buy it!